A CAM is a memory device with specialized circuitry to access stored data based on its content; CAM can be contrasted, for example, with memory devices that access data using only an address or other data indicating its location. CAMs are useful in various applications requiring fast search over a database, list, or pattern. CAMs are particularly well suited for handling packet protocols, such as TCP/IP protocols employed in packet processors that route information across an intranet or the Internet.
Conventionally, a CAM includes a memory array, each location of which can store a data entry. Comparison circuitry in the memory array makes it possible to search memory locations based on content. In response to search data, conventional CAM comparison circuitry typically stores bit values in a comparand register and then compares comparand register bits with bits of entries stored in memory locations. The comparison circuitry can apply an appropriate match criterion requiring some or all bits to match.
Two or more locations in a CAM memory array may store data entries that satisfy a match criterion, especially where the criterion requires only a few bits to match. Therefore, conventional CAMs also include a priority encoder (PE) for resolving multiple matches. A typical CAM's PE receives a match signal for each location in the memory array and provides a priority signal with the same number of bits as there are memory locations. At most one bit of the priority signal can be asserted at a time. An asserted bit in the priority signal indicates that the respective location's match signal is asserted and has priority. An address encoder can then convert the priority signal to an address code, and the address code can be used in a manner suitable to the application, such as to retrieve information relevant to the search data.
Conventional CAM PEs also provide a match bit indicating whether a search resulted in any asserted match signals, and this match bit indicates no match when it is turned off. The PE match bit is typically used in obtaining an output match bit for a CAM.
Each CAM memory location typically includes a set of status bits or flags that are used in CAM operations. For example, some conventional CAMs provide a bit for each location that, when asserted, causes the CAM to ignore, override, or otherwise suppress an asserted match signal for that location. Some CAMs also use a bit of this type in obtaining search results.
In recent years, various integrated circuits (ICs) with CAM capabilities have become commercially available. These CAM ICs have a variety of features for obtaining search results.
Some conventional CAM ICs allow multiple search widths. For example, some commercially available CAM ICs can be configured to widths of 32 or 64 bits, others to 68, 136, or 272 bits, and others to 72, 144, or 288 bits. These ICs may, for example, include circuitry to combine match results for adjacent groups of two or four entries to obtain a match result for a double or quadruple width.
It would be advantageous to have additional techniques for obtaining CAM search results, particularly techniques that improve area- and power-efficiency of CAM ICs. It would be advantageous to have improved techniques both for obtaining output address codes and also for obtaining output match bits.